# Define notification event for thread completion
import wx

# Define notification event for thread alarm
EVT_ALARM_ID = wx.NewId()

def EVT_ALARM(win, func):
    """Define Alarm Event."""
    win.Connect(-1, -1, EVT_ALARM_ID, func)

class AlarmEvent(wx.PyEvent):
    """Simple event to carry arbitrary alarm data."""
    def __init__(self, data):
        """Init Alarm Event."""
        wx.PyEvent.__init__(self)
        self.SetEventType(EVT_ALARM_ID)
        self.data = data        